import Vue from "vue";
import Vuex from 'vuex';
Vue.use(Vuex);
let store = new Vuex.Store({
  state: {
    uid:"",
    data:[]
  },
  mutations: {
    LOGIN(state,data) {
      state.uid=data.uid;
      state.data = data;
      localStorage.setItem("uid",data.uid);
    },
    OUT_LOGIN(state){
      state.uid="";
      state.data=null;
      localStorage.setItem("uid","")

    }
  }
});

export default store
